export function getToken() {
  return getApp().globalData?.token || uni.getStorageSync("token");
}

export function setToken(token) {
  getApp().globalData.token = token;

  return uni.setStorageSync("token", token);
}

export function setStorage(name, data) {
  return uni.setStorageSync(name, data);
}

export function getStorage(name) {
  return uni.getStorageSync(name);
}

export function setGloBalData(name, data) {
  getApp().globalData[name] = data;
}

export function getGloBalData(name, data) {
  return getApp().globalData[name];
}

export function removeStorage(name) {
  return uni.removeStorageSync(name);
}
